import 'package:flutter/material.dart';

class MyApp7 extends StatelessWidget {
  const MyApp7({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // 导航条
      appBar: AppBar(
        title: const Text('Image组件',
            style: TextStyle(color: Colors.white, fontSize: 20)),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      // 主体区域
      // body: Center(
      //   // 加载网络图片
      //   child: Image.network(
      //       'https://yanxuan-item.nosdn.127.net/e529b6ab111ade9da9314867f98d360f.png', fit: BoxFit.contain, width: 200,),
      // )
      body: Center(
        child: Container(
          width: 200,
          height: 200,
          color: Colors.cyan,
          child: Image.asset('qiche.png'),
        ),
      )
    );
  }
}
